<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.ajax4jsf.org/rich">

<body>
<f:view>
    <ui:composition template="../../template/template.xhtml">

    <ui:define name="conteudo">
            
            
    <a4j:form id="formIncluirPaciente" style="width: 50.1%; margin-left: 320px; border: 1px solid #B0C4DE; margin-top: -16px; margin-bottom: -16px;">
		     
		<a4j:loadScript src="/js/jscripts.js"/>
		<a4j:loadScript src="/js/jquery.js"/>    
			        
        <rich:messages style="margin-left:10px; COLOR: #ff0000; FONT-WEIGHT: bold;"></rich:messages>
        
        <br />
        
        <center>
        
        <b>Incluir Paciente</b>
        </center>
        
        <br />
        		
        <div style="margin-left:10px;">
        
                <h:outputLabel value="Nome *" style="FONT-WEIGHT: bold; margin-right: 12px; margin-left: 77px;"/>
                <h:inputText value="#{pacienteBean.paciente.noPaciente}" style="height : 23px; width : 460px;" maxlength="80"/>
				
				<br />
				
            	<h:outputLabel value="Data Nascimento *" style="FONT-WEIGHT: bold; margin-left: 1px; margin-right: 10px;"/>
            	<rich:calendar value="#{pacienteBean.dataNascimento}" enableManualInput="true" datePattern="dd/MM/yyyy" converter="DateConverter" />
            	            	         
				<h:outputLabel value="Sexo *" style="FONT-WEIGHT: bold; margin-left: 71px; margin-right: 10px;"/>
				<h:selectOneMenu value="#{pacienteBean.deSexoForm}" style="width:100px !important;">
					<f:selectItem itemLabel="Selecione" itemValue=""/>
					<f:selectItems value="#{pacienteBean.sexos}"/>
				</h:selectOneMenu>
				           	
           		<br />
           	
				<h:outputLabel value="Estado Civil *" style="FONT-WEIGHT: bold; margin-left: 36px; margin-right: 10px;"/>
				<h:selectOneMenu value="#{pacienteBean.paciente.deEstadoCivil}">
					<f:selectItem itemLabel="Selecione" itemValue="" />
					<f:selectItems value="#{pacienteBean.estadosCivis}"/>
				</h:selectOneMenu>								
				
				<h:outputLabel value="Profissão *" style="FONT-WEIGHT: bold; margin-left: 97px; margin-right: 10px;"/>
               	<h:inputText value="#{pacienteBean.paciente.deProfissao}" maxlength="100"/>
            
            	<br />
            
                <h:outputLabel value="Endereço *" style="FONT-WEIGHT: bold; margin-left: 56px; margin-right: 10px;"/>
                <h:inputText value="#{pacienteBean.paciente.deEndereco}" style="height : 23px; width : 459px;" maxlength="150"/>
			
				<br />
			
            	<h:outputLabel value="Bairro *" style="FONT-WEIGHT: bold; margin-left: 73px; margin-right: 10px;"/> 
           		<h:inputText value="#{pacienteBean.paciente.deBairro}" maxlength="80"/>
            	          
				<h:outputLabel value="Município *" style="FONT-WEIGHT: bold; margin-left: 57px; margin-right: 10px;"/> 
           		<h:inputText value="#{pacienteBean.paciente.deMunicipio}" maxlength="80"/>
           	
           		<br />
           	
            	<h:outputLabel value="UF *" style="FONT-WEIGHT: bold; margin-left: 96px; margin-right: 10px;"/> 
				<h:selectOneMenu value="#{pacienteBean.paciente.deUF}">
					<f:selectItem itemLabel="Selecione" itemValue=""/>
					<f:selectItems value="#{pacienteBean.ufs}"/>
				</h:selectOneMenu>

				<h:outputLabel value="CEP *" style="FONT-WEIGHT: bold; margin-left: 148px; margin-right: 10px;"/> 
           		<h:inputText id="cep" value="#{pacienteBean.paciente.deCEP}" title="Insira somente os números">
					<rich:jQuery selector="#cep" query="mask('99.999-999')" timing="onload" />
				</h:inputText>
           	
           		<br />
           	
            	<h:outputLabel value="Fone Residencial" style="FONT-WEIGHT: bold; margin-left: 13px; margin-right: 10px;"/> 
           		<h:inputText id="foneResid" value="#{pacienteBean.paciente.deTelResid}" title="Insira somente os números">
					<rich:jQuery selector="#foneResid" query="mask('(99)9999-9999')" timing="onload" />
				</h:inputText>

				<h:outputLabel value="Fone Celular *" style="FONT-WEIGHT: bold; margin-left: 38px; margin-right: 10px;"/> 
				<h:inputText id="foneCelular" value="#{pacienteBean.paciente.deTelCelular}" title="Insira somente os números">
					<rich:jQuery selector="#foneCelular" query="mask('(99)9999-9999')" timing="onload" />
				</h:inputText>
					
           	
           		<br />
           	
            	<h:outputLabel value="CPF *" style="FONT-WEIGHT: bold; margin-left: 87px; margin-right: 10px;"/> 
				<h:inputText id="cpf" value="#{pacienteBean.paciente.deCPF}" title="Insira somente números">
					 <rich:jQuery selector="#cpf" query="mask('999.999.999-99')" timing="onload"/>  
				</h:inputText>
                

				<h:outputLabel value="RG *" style="FONT-WEIGHT: bold; margin-left: 100px; margin-right: 10px;"/> 
           		<h:inputText value="#{pacienteBean.paciente.deRG}" maxlength="20"/>
           		
           	</div>
        	
            <br />
            <br />
             
           <center>
            <h:panelGrid columns="2">
            <rich:column >
                    
                    <f:facet name="header">
                        <h:outputText value="Botoes" />
                    </f:facet>
                                    
                    <a4j:commandButton action="#{pacienteBean.carregarInicio}" value="Cancelar" style="FONT-WEIGHT: bold; float:right;"/>
                    <a4j:commandButton action="#{pacienteBean.executarIncluir}" value="   Incluir   " style="FONT-WEIGHT: bold; float:right; margin-left: 10px;" />  
                    <a4j:commandButton id="botaoLimpar" action="#{pacienteBean.limparCampos}" value="Limpar" reRender="formIncluirPaciente" />    
                                  
            </rich:column>
            </h:panelGrid>
            
             </center>
             <a4j:keepAlive beanName="pacienteBean"/>
             
             <br />
             <br />
             
    </a4j:form>
</ui:define>
    </ui:composition>
</f:view>
</body>
</html>